<?php
defined('_JEXEC') or die('Restricted access');
define( 'com_complaints_DIR', 'images'.DS.'Complaints'.DS );
define( 'com_complaints_BASE', JPATH_ROOT.DS.com_complaints_DIR );
define( 'com_complaints_BASEURL', JURI::root().str_replace( DS, '/', com_complaints_DIR ));
JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'tables');
require_once JPATH_COMPONENT.DS.'controller.php';
if ($controller = JRequest::getWord('controller')) {
	$path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
	if (file_exists($path)) {
		require_once $path;
	} else $controller = '';
}
$classname = 'ComplaintsController'.$controller;
$controller = new $classname();
$controller->execute( JRequest::getVar('task'));
$controller->redirect();
?>
